﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BluePortal.Framework;
using System.ServiceModel;
using System.Security.Permissions;
using BluePortal.Medias.Core;

namespace BluePortal.Medias.Services.Soap
{
    [ServiceContract(Namespace = "BluePortal.Medias.Services.Soap")]
    public interface ICategoryService
    {
    }

    public class CategoryService : ICategoryService
    {
        private BCCategory service = new BCCategory();

        #region IVideoCategoryService Members

        public void Add(Guid categoryID, Guid videoID)
        {
            service.Add(categoryID, videoID);
        }

        public void Remove(Guid categoryID, Guid videoID)
        {
            service.Remove(categoryID, videoID);
        }

        public IEnumerable<Category> FindAll()
        {
            return service.FindAll();
        }

        public IEnumerable<Category> FindByName(string name)
        {
            return service.FindByName(name);
        }

        public IEnumerable<Category> FindAllByMedia(Guid videoID)
        {
            return service.FindAllByMedia(videoID);
        }

        public IEnumerable<Category> FindByMedia(Guid videoID)
        {
            return service.FindByMedia(videoID);
        }

        #endregion

        #region IBasicService<Category> Members

        public void Create(Category item)
        {
            service.Create(item);
        }

        public void Delete(Category item)
        {
            service.Delete(item);
        }

        public void Update(Category item)
        {
            service.Update(item);
        }

        public Category FindByID(Guid id)
        {
            return service.FindByID(id);
        }


        #endregion
    }
}
